package com.example.zhixu.myapp2;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

public class BindService extends Service {

    private int info = 1000;
    public BindService() {
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Log.i("zhixu", "service create...");
    }

    @Override
    public boolean onUnbind(Intent intent) {
        Log.i("zhixu", "unbind service...");
        return super.onUnbind(intent);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.i("zhixu", "destroy service...");
    }

    @Override
    public IBinder onBind(Intent intent) {
        Log.i("zhixu", "bind info...");
        Spy spyStub = new Spy();
        spyStub.setInfo(info);
        return spyStub;
    }
}
